package com.codinghero.example.jdk.lock.condition;

public class PrintThread implements Runnable {

	public void run() {
		for (int i = 0; i < 10000; i++) {
			if (i == 1234) {
				try {
					ConditionExample.LOCK.lock();
					ConditionExample.CONDITION.await();
				} catch (InterruptedException e) {
					e.printStackTrace();
				} finally {
					ConditionExample.LOCK.unlock();
				}
			} else
				System.out.println(i);
		}
	}
}
